FROM openjdk:8u342-slim

LABEL user="chris" mail="majewing@126.com" name="supreme-upload-server" group="supreme-server"

EXPOSE 7150

ARG INPUT_DATE=current-date
RUN echo ${INPUT_DATE} > /home/build-date.log

ARG APP_HOME=/home/supreme-upload-server
RUN mkdir -p ${APP_HOME}

VOLUME ["${APP_HOME}/logs"]

ARG JAR_FILE=supreme-upload-server-0.0.1.jar

ADD ${JAR_FILE} ${APP_HOME}/app-server.jar

WORKDIR ${APP_HOME}

ENTRYPOINT ["java", "-jar", "app-server.jar", "--spring.profiles.active=docker"]
CMD ["--logging.file.name=./logs/upload-server.log"]